How to find directional derivative